<?php

// [ 管理凭据 ]

namespace app\qiniu\lib;
use think\Config;

class AccessToken
{
    // 密钥
    private static $_accessKey;
    // 密匙
    private static $_secretKey;
    // 空间
    private static $_space;
    // 凭据有效期
    private static $_expire;

    // 初始化
    private static function _init()
    {
        self::$_accessKey = Config::get('qiniu.accessKey');
        self::$_secretKey = Config::get('qiniu.secretKey');
        self::$_space     = Config::get('qiniu.space');
        self::$_expire    = Config::get('qiniu.expire');
    }

    public static function get()
    {
        self::_init();

        $url = 'rsf.qbox.me/list?bucket' . '51dojob';
        $data = [];
        $res = http_curl($url,'POST',$data);
        p($res);
    }
}